﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using Microsoft.Kinect;
using Microsoft.Xna.Framework;

namespace KinectFundamentals.GestureRecognizer {
    public abstract class AbstractGestureRecognizer {
 
        protected DataStreamsDictionary DataStreamsDictionary = new DataStreamsDictionary();
        public event Action<string,JointEnum,DirectionEnum,DateTime,DateTime> OnGestureDetected;

        protected JointEnum JointEnum;
        
  
        public void GestureRecognizer(JointEnum jointEnum, DataStreamsDictionary dataStreamsDictionary) {
            JointEnum = jointEnum;
            DataStreamsDictionary = dataStreamsDictionary;
        }

        public abstract void DetectGesture();

        protected void RaiseGestureDetected(string gesture, JointEnum source, DirectionEnum direction, DateTime fromTime, DateTime toTime) {
            if (OnGestureDetected != null) {
                OnGestureDetected(gesture, source, direction,fromTime,toTime);
            }

        }
    }
}